// ml:run = $bin < input
#include <iostream>

int n, a, b;

int gcd(int x, int y)
{
    return !y ? x : gcd(y, x % y);
}

int main()
{
    std::ios_base::sync_with_stdio(false);
    int T; std::cin >> T;
    for (int ti = 1; ti <= T; ti++) {
        std::cout << "Case #" << ti << ": ";
        std::cin >> n >> a >> b;
        int t = gcd(a, b);
        int tmp = n / t - 2;
        if (tmp & 1) std::cout << "Yuwgna\n";
        else std::cout << "Iaka\n";
    }
}

